package fr.afcepf.atod.projet.entities;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;


/**
 * The persistent class for the personne database table.
 * 
 */
@Entity
@Table(name="personne")
public class Personne implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(unique=true, nullable=false)
	private int id;

	@Column(nullable=true, length=50)
	private String login;

	@Column(nullable=true, length=50)
	private String nom;

	@Column(name="numero_etudiant", nullable=true)
	private Integer numeroEtudiant;

	@Column(nullable=true, length=50)
	private String password;

	@Column(nullable=true, length=50)
	private String prenom;

	@Column(name="salaire_formateur", nullable=true)
	private Integer salaireFormateur;

	@Column(name="type_personne", nullable=true, length=50)
	private String typePersonne;

	//bi-directional many-to-one association to Cursus
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="cursus_etudiant", nullable=true)
	private Cursus cursus;
	
	
    public Personne() {
    }

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getLogin() {
		return this.login;
	}

	public void setLogin(String login) {
		this.login = login;
	}

	public String getNom() {
		return this.nom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}


	public Integer getNumeroEtudiant() {
		return numeroEtudiant;
	}

	public void setNumeroEtudiant(Integer numeroEtudiant) {
		this.numeroEtudiant = numeroEtudiant;
	}

	public Integer getSalaireFormateur() {
		return salaireFormateur;
	}

	public void setSalaireFormateur(Integer salaireFormateur) {
		this.salaireFormateur = salaireFormateur;
	}

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getPrenom() {
		return this.prenom;
	}

	public void setPrenom(String prenom) {
		this.prenom = prenom;
	}


	public String getTypePersonne() {
		return this.typePersonne;
	}

	public void setTypePersonne(String typePersonne) {
		this.typePersonne = typePersonne;
	}

	public Cursus getCursus() {
		return cursus;
	}

	public void setCursus(Cursus cursus) {
		this.cursus = cursus;
	}

}